package com.ymttest.common.enums;

/**
 * 订单超时枚举
 */
public enum OrderOverTimeEnum {
	/**
	 * 所有状态
	 */
	All(0),

	/**
	 * 即将超时
	 */
	OverTimeSoon(1),

	/**
	 * 已超时
	 */
	OverTime(2);

	private int intValue;
	private static java.util.HashMap<Integer, OrderOverTimeEnum> mappings;

	private synchronized static java.util.HashMap<Integer, OrderOverTimeEnum> getMappings() {
		if (mappings == null) {
			mappings = new java.util.HashMap<Integer, OrderOverTimeEnum>();
		}
		return mappings;
	}

	private OrderOverTimeEnum(int value) {
		intValue = value;
		OrderOverTimeEnum.getMappings().put(value, this);
	}

	public int getValue() {
		return intValue;
	}

	public static OrderOverTimeEnum forValue(int value) {
		return getMappings().get(value);
	}
}